package com.cuit.washneedshake.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cuit.washneedshake.model.entity.NationalNewTrends;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

@Mapper
public interface NationalNewTrendsMapper extends BaseMapper<NationalNewTrends> {


    @Select("select new_confirmed from national_new_trends where id = ${s_id}")
    Integer getNew_ConfirmedById(int s_id);

    @Select("select SUM(new_confirmed) from national_new_trends")
    Integer getNew_ConfirmedSum();


    @Select("select new_suspected from national_new_trends where id = ${s_id}")
    Integer getNew_SuspectedById(int s_id);

    @Select("select SUM(new_suspected) from national_new_trends")
    Integer getNew_SuspectedSum();



    @Select("select date from national_new_trends where id = ${s_id}")
    Date getDate(int s_id);
}




